<!doctype html>
<jsp:directive.page import="com.cn.ccp.bean.UserBean" />
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<html lang="en">
<f:view>
	<f:loadBundle var="messages" basename="messages"></f:loadBundle>
	<head>
		<title><h:outputText value="#{messages['system_title']}" /></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta name="description" content="">
	    <meta name="author" content="">
	
	    <!-- styles -->
	    <link href="<%=request.getContextPath()%>/css/bootstrap.css" rel="stylesheet">
	    <link href="<%=request.getContextPath()%>/css/bootstrap-responsive.css" rel="stylesheet">
	    <link href="<%=request.getContextPath()%>/css/custom.css" rel="stylesheet">
	    <!--[if lt IE 9]>
	      <script src="../../js/html5.js"></script>
	    <![endif]-->
	    <!-- Fav and touch icons -->
	    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-144-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-114-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-72-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-57-precomposed.png">
	    <link rel="shortcut icon" href="<%=request.getContextPath()%>/images/icon/favicon.png">
	</head>
	<body class="bg-white" style="overflow-x:hidden;">
	<a id="viewDiv"></a>	
		<h:form id="formid">
			<div class="row page-head">
				<h3 class="page-title">
					<i class="n-icon-selection  n-icon-black"></i><h:outputText value="#{messages['class_schedule_page_title']}"/>&nbsp;&gt;&nbsp;<b><h:outputText value="#{messages['class_schedule_page_edit']}" /></b>
				</h3>
			</div>
				
			<div style="margin-left: 20px;margin-right: 20px">	
				<h:inputHidden value="#{classScheduleDetailEditAction.initData}"></h:inputHidden>
				<h:inputHidden value="#{classScheduleDetailEditAction.bean.id}"></h:inputHidden>
				<h:inputHidden value="#{classScheduleDetailEditAction.bean.classScheduleId}"></h:inputHidden>
				<h:inputHidden value="#{classScheduleDetailEditAction.disableTeachItem}"></h:inputHidden>
				
				<h:panelGrid columns="3">
				
				
					<h:outputText value="#{messages['class_schedule_page_subjects']}" />
					<h:inputText id="subjects" value="#{classScheduleDetailEditAction.bean.subjects}" > 
						<f:converter converterId="stringconverter"/>
					</h:inputText>
					<h:message for="subjects" style="color:red" />
					 
					<h:outputText value="#{messages['class_schedule_page_start_week']}" />
					<h:inputText id="startWeek" value="#{classScheduleDetailEditAction.bean.startWeek}" > </h:inputText>
					<h:message for="startWeek" style="color:red" />
					 
					<h:outputText value="#{messages['class_schedule_page_end_week']}" />
					<h:inputText id="endWeek" value="#{classScheduleDetailEditAction.bean.endWeek}" > </h:inputText>
					<h:message for="endWeek" style="color:red" />
					 
					<h:outputText value="#{messages['class_schedule_page_class_address']}" />
					<h:inputText id="classAddress" value="#{classScheduleDetailEditAction.bean.classAddress}" > 
						<f:converter converterId="stringconverter"/>
					</h:inputText>
					<h:message for="classAddress" style="color:red" />
					 
					<h:outputText value="#{messages['class_schedule_page_week_type']}" />
					<h:selectOneRadio id="weekType" value="#{classScheduleDetailEditAction.bean.weekType}" >
						<f:selectItem itemValue="1" itemLabel="#{messages['class_schedule_page_week_type_single']}"  />
						<f:selectItem itemValue="2" itemLabel="#{messages['class_schedule_page_week_type_double']}"  />
						<f:selectItem itemValue="4" itemLabel="#{messages['class_schedule_page_week_type_default']}"  />
					</h:selectOneRadio>
					<h:message for="weekType" style="color:red" />
					 
					<h:outputText value="#{messages['class_schedule_page_teacher']}" />
					<h:selectOneMenu id="teacherId" value="#{classScheduleDetailEditAction.bean.teacherId}" disabled="#{classScheduleDetailEditAction.disableTeachItem}">
						<f:selectItem itemLabel="#{messages['messages_select']}" itemValue="-1" />
						<f:selectItems value="#{classScheduleDetailEditAction.teacherItem}" />
					</h:selectOneMenu>
					<h:message for="teacherId" style="color:red" />
					 
				</h:panelGrid>
				
				<div class="form-actions">
					<h:commandButton value="#{messages['btn_submit']}" action="#{classScheduleDetailEditAction.update}" styleClass="btn btn-primary" />
					<h:outputText value=" "></h:outputText>
					<h:commandButton value="#{messages['btn_cancel']}" action="main" styleClass="btn" />
					<h:outputText value=" "></h:outputText>
					<h:commandButton value="#{messages['btn_delete']}" action="#{classScheduleDetailEditAction.delete}" styleClass="btn btn-danger" rendered="#{classScheduleDetailEditAction.showDeleteBtn}"/>
				</div>
				
			</div>	
		</h:form>
		<script type="text/javascript">
		$(document).ready(function() {
			//document.getElementById('viewDiv').scrollIntoView();
		});
		</script>
</body>
</f:view>
</html>